import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {
  const routerPath = ref('')
  const isIndex = computed(() => routerPath.value === '/index')
  function setRouterPath(val) {
    routerPath.value = val
  }
  return { routerPath, isIndex, setRouterPath }
})
